<template>
  <view class="container">
    <!-- 本季度工单统计 -->
    <view class="stats-card">
      <view class="card-header">
        <text class="card-title">本季度工单 (2024年季度)</text>
      </view>
      <view class="card-content">
        <view class="stats-row">
          <view class="stats-item">
            <view class="stats-icon green">
              <image src="/static/icons/doc-edit.png" class="icon"></image>
            </view>
            <text class="stats-label">特完成</text>
            <text class="stats-value">15</text>
          </view>
          <view class="stats-item">
            <view class="stats-icon blue">
              <image src="/static/icons/doc.png" class="icon"></image>
            </view>
            <text class="stats-label">已完成</text>
            <text class="stats-value">175</text>
          </view>
        </view>
        <view class="income-row">
          <view class="income-label">预计收入</view>
          <view class="income-value">
            <text class="amount">700,000</text>
            <view class="trend up">
              <text class="percentage">6%</text>
              <image src="/static/icons/arrow-up.png" class="arrow"></image>
            </view>
          </view>
        </view>
      </view>
    </view>

    <!-- 本年度工单统计 -->
    <view class="stats-card">
      <view class="card-header">
        <text class="card-title">本年度工单 (2024年)</text>
      </view>
      <view class="card-content">
        <view class="stats-row">
          <view class="stats-item">
            <view class="stats-icon green">
              <image src="/static/icons/doc-edit.png" class="icon"></image>
            </view>
            <text class="stats-label">特完成</text>
            <text class="stats-value">15</text>
          </view>
          <view class="stats-item">
            <view class="stats-icon blue">
              <image src="/static/icons/doc.png" class="icon"></image>
            </view>
            <text class="stats-label">已完成</text>
            <text class="stats-value">870</text>
          </view>
        </view>
        <view class="income-row">
          <view class="income-label">预计收入</view>
          <view class="income-value">
            <text class="amount">2,800,000</text>
            <view class="trend up">
              <text class="percentage">9%</text>
              <image src="/static/icons/arrow-up.png" class="arrow"></image>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<style>
.container {
  padding: 20rpx;
  background: #F5F5F5;
  min-height: 100vh;
}

.stats-card {
  background: #FFFFFF;
  border-radius: 12rpx;
  margin-bottom: 20rpx;
  padding: 20rpx;
}

.card-header {
  margin-bottom: 20rpx;
}

.card-title {
  font-size: 28rpx;
  color: #333;
  font-weight: 500;
}

.card-content {
  padding: 10rpx;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30rpx;
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8rpx;
}

.stats-icon {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-icon.green {
  background-color: #E6F7E6;
}

.stats-icon.blue {
  background-color: #E8F4FF;
}

.icon {
  width: 32rpx;
  height: 32rpx;
}

.stats-label {
  font-size: 26rpx;
  color: #666;
}

.stats-value {
  font-size: 36rpx;
  color: #333;
  font-weight: 500;
}

.income-row {
  border-top: 1rpx solid #EEEEEE;
  padding-top: 20rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.income-label {
  font-size: 26rpx;
  color: #666;
}

.income-value {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.amount {
  font-size: 32rpx;
  color: #333;
  font-weight: 500;
}

.trend {
  display: flex;
  align-items: center;
  gap: 4rpx;
}

.trend.up {
  color: #FF4D4F;
}

.percentage {
  font-size: 24rpx;
}

.arrow {
  width: 24rpx;
  height: 24rpx;
}
</style>
